#pragma once
#include"rbtree.h"

namespace Wang
{
	template<class K>
	class set
	{
		struct Setkot
		{
			const K& operator()(const K& k)
			{
				return k;
			}
		};
	public:
		typedef typename RBTree<K, K, Setkot>::Iterator iterator;
		typedef typename RBTree<K, K, Setkot>::Const_Iterator const_iterator;
		iterator begin()
		{
			return _root.Begin();
		}
		iterator end()
		{
			return _root.End();
		}
		const_iterator begin() const
		{
			return _root.Begin();
		}
		const_iterator end() const
		{
			return _root.End();
		}
		bool insert(const K& key)
		{
			return _root.insert(key);
		}
	private:
		RBTree<K, K, Setkot> _root;
	};
}